package com.wjgl.action;

import com.opensymphony.xwork2.ActionSupport;
import com.wjgl.service.UserService;

public class AllocateUserAction extends ActionSupport {
	private UserService userService;
	private int id;
	private int institutionId;
	private int departmentId;
	private int roleId;
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setInstitutionId(int institutionId) {
		this.institutionId = institutionId;
	}
	public void setDepartmentId(int departmentId) {
		this.departmentId = departmentId;
	}
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
//		System.out.println("userid="+id);
//		System.out.println("institutionId="+institutionId);
//		System.out.println("departmentId="+departmentId);
//		System.out.println("roleId="+roleId);
		//System.out.println(userService.allocateUser(id, institutionId, departmentId, roleId));
		userService.allocateUser(id, institutionId, departmentId, roleId);
		return null;
	}
	
}
